/* 图书馆首页样式 */

body {
  background-color: #f5f7fa;
  background-image: url('../img/bodybg.jpeg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}

.tab-pane{
    min-height:460px;
}
.notice-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.notice-item {
    padding: 68px 30px 23px 28px;
    border-bottom: 1px solid #e9ecef;
    border-radius: 10px;
    background:#fff;
}

  .notice-item:last-child {
    border-bottom: none;
  }

  .notice-date {
    width: 60px;
    padding-right: 12px;
  }

  .date-day {
    font-size: 24px;
    font-weight: bold;
    color: #6c757d;
  }

  .date-month {
    font-size: 12px;
    color: #6c757d;
  }

  .notice-content {
    flex: 1;
  }

  .notice-tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #f8d7da;
    color: #721c24;
    font-size: 12px;
    border-radius: 4px;
    margin-bottom: 4px;
  }

  .notice-title {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .notice-title a:hover {
    text-decoration: underline;
  }

/* 确保不影响原有导航栏 */
.library-home .cm-navbar {
  /* 保持原有导航栏样式 */
}

/* 基础样式重置 */
.library-home {
  background-color: #f5f7fa;
  background-image: url('../img/bodybg.jpeg');
  background-size: cover;        /* 添加这行：使背景图片覆盖整个区域 */
  background-repeat: no-repeat;  /* 添加这行：防止背景图片重复 */
  background-position: center center; /* 添加这行：居中显示背景图片 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 确保导航栏正常显示 - 只针对图书馆主页的导航，不影响原有导航 */
.library-main .library-nav .nav {
  display: flex;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 5px;
}

.library-main .library-nav .nav-link {
  color: rgba(255, 255, 255, 0.8);
  border-radius: 25px;
  padding: 10px 20px;
  margin: 0 5px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.library-main .library-nav .nav-link:hover,
.library-main .library-nav .nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* 顶部英雄区域 */
.library-hero {
  min-height:850px;
  color: white;
  padding: 20px 0 0px; /* 增加底部padding为轮播图留出空间 */
  position: relative;
}

/* 轮播图样式 */
.library-hero .carousel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

/* 轮播图指示器样式 */
.library-hero .carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.library-hero .carousel-indicators li {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  width: 12px;
  height: 12px;
  margin: 0 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.library-hero .carousel-indicators li.active {
  background-color: rgba(255, 255, 255, 0.9);
  transform: scale(1.2);
}

/* 轮播图控制按钮样式 */
.library-hero .carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  font-size: 20px;
  color: white;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.5);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.library-hero .carousel-control:hover {
  background: rgba(0, 0, 0, 0.5);
}

.library-hero .carousel-control-prev {
  left: 20px;
}

.library-hero .carousel-control-next {
  right: 20px;
}

.library-hero .carousel-inner {
  max-height: 850px; /* 限制轮播图高度 */
}

.library-hero .carousel-caption {
  background: rgba(0, 0, 0, 0.7);
  padding: 15px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
}

.library-hero .carousel-caption p {
  margin: 0;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 确保轮播图不影响其他元素 */
.library-hero .library-top-bar {
  position: relative;
  z-index: 2;
  background: rgba(102, 126, 234, 0.1);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  margin-top: 10px;
}

.library-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.library-hero > .container {
  position: relative;
  z-index: 2;
}

/* 顶部信息栏 */
.library-top-bar {
  margin-bottom: 30px;
}

.library-title {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  margin: 0;
  color: white;
}

.library-logo {
  height: 40px;
  margin-right: 15px;
  border-radius: 5px;
}

.library-hours {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  margin-bottom: 10px;
}

.library-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* 主导航 */
.library-nav {
  margin-bottom: 40px;
}

.library-nav .nav {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 5px;
}

.library-nav .nav-link {
  color: rgba(255, 255, 255, 0.8);
  border-radius: 25px;
  padding: 10px 20px;
  margin: 0 5px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.library-nav .nav-link:hover,
.library-nav .nav-link.active {
  background: #94070a;
  color: white;
}

.library-nav .nav-link i {
  margin-right: 5px;
}

/* 搜索区域 */
.library-search-section {
  max-width: 800px;
  margin: 0 auto;
}

.search-title {
  text-align: center;
  font-size: 28px;
  margin-bottom: 20px;
  font-weight: 300;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-tabs {
  text-align: center;
  margin-bottom: 20px;
}

.search-tabs .btn-group .btn {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
}

.search-tabs .btn-group .btn:hover,
.search-tabs .btn-group .btn.active {
  background: #94070a;
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

.search-form .form-control {
  height: 50px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  font-size: 16px;
}

.search-form .search-input {
  border-left: none;
}

.search-form .search-btn {
  height: 50px;
  padding: 0 30px;
  background: #94070a;
  border-color: #94070a;
  color: white;
  font-weight: bold;
}

/* 搜索框焦点状态 */
.search-form .search-input:focus {
  outline: none;
  border: 2px solid #94070a;
  box-shadow: 0 0 5px rgba(102, 126, 234, 0.1);
  background-color: white;
}

/* 搜索类型切换按钮焦点状态 */
.search-tabs button:focus {
  outline: none;
  box-shadow: 0 0 5px rgba(102, 126, 234, 0.1);
}

.search-form .search-btn:hover {
  background: #e55a2b;
  border-color: #e55a2b;
}

/* 功能快捷入口 */
.library-functions {
  background: white;
  padding: 40px 0;
  margin-top: -30px;
  position: relative;
  z-index: 3;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.function-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.function-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: #333;
  padding: 15px;
  border-radius: 10px;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.function-item:hover {
  background: #f8f9fa;
  transform: translateY(-3px);
  text-decoration: none;
  color: #667eea;
}

.function-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea, #94070a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.function-item:hover .function-icon {
  transform: scale(1.1);
}

.function-item span {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.function-item:hover span {
  color: #667eea;
}

/* 主要内容区域 */
.library-content {
  padding: 40px 0;
  background: #f5f7fa;
}

/* 标签页样式 */
.library-tabs {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.library-tabs .nav-tabs {
  border-bottom: 2px solid #e9ecef;
}

.library-tabs .nav-tabs .nav-link {
  border: none;
  color: #6c757d;
  font-weight: 500;
  padding: 12px 24px;
  transition: all 0.3s ease;
}

.library-tabs .nav-tabs .nav-link.active {
  background: transparent;
  color: #94070a;
  border-bottom: 3px solid #667eea;
}

.library-tabs .nav-tabs .nav-link:hover {
  color: #667eea;
}

/* 修复焦点状态：确保只有当前激活的标签显示active样式 */
.library-tabs .nav-tabs .nav-link:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
  color: #667eea;
  border-bottom: 3px solid #667eea;
}

/* 移除非激活状态的active样式，防止失去焦点时保持激活状态 */
.library-tabs .nav-tabs .nav-link:not(.active):focus {
  color: #6c757d;
  border-bottom: none;
}

.library-tabs .nav-tabs .nav-link i {
  margin-right: 8px;
}

/* 内容列表 */
.content-list {
  max-height: 400px;
  overflow-y: auto;
}

.content-item {
  display: flex;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.content-item:hover {
  background: #f8f9fa;
  margin: 0 -15px;
  padding: 15px;
}

.content-date {
  width: 120px;
  flex-shrink: 0;
  color: #6c757d;
  font-size: 14px;
}

.content-info {
  flex-grow: 1;
}

.content-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.content-title a {
  color: #333;
  transition: color 0.3s ease;
}

.content-title a:hover {
  color: #667eea;
}

.content-excerpt {
  color: #6c757d;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* 空状态 */
.empty-content {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

/* 统计卡片 */
.statistics-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
}

.statistics-card h5 {
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e9ecef;
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-label {
  color: #6c757d;
  font-size: 14px;
}

.stat-value {
  font-weight: bold;
  color: #667eea;
  font-size: 16px;
}

/* 区块标题 */
.section-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 3px solid #667eea;
  display: inline-block;
}

/* 校区信息 */
.library-campus-info {
  background: white;
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.campus-card {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
  border: 2px solid transparent;
}

.campus-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.campus-card h4 {
  color: #333;
  font-weight: 600;
  margin-bottom: 20px;
}

.campus-stats {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.campus-stats .stat {
  text-align: center;
}

.campus-stats .stat-number {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: #667eea;
}

.campus-stats .stat-label {
  font-size: 12px;
  color: #6c757d;
}

/* 数据库资源 */
.library-databases {
  background: white;
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.database-tabs .nav-tabs .nav-link {
  border: none;
  color: #6c757d;
  font-weight: 500;
  padding: 10px 20px;
  transition: all 0.3s ease;
}

.database-tabs .nav-tabs .nav-link.active {
  background: transparent;
  color: #ff6b35;
  border-bottom: 3px solid #ff6b35;
}

/* 修复数据库标签焦点状态 */
.database-tabs .nav-tabs .nav-link:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
  color: #ff6b35;
  border-bottom: 3px solid #ff6b35;
}

/* 移除非激活状态的active样式，防止失去焦点时保持激活状态 */
.database-tabs .nav-tabs .nav-link:not(.active):focus {
  color: #6c757d;
  border-bottom: none;
}

.database-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.database-item {
  text-align: center;
}

.database-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  padding: 20px;
  border-radius: 10px;
  background: #f8f9fa;
  transition: all 0.3s ease;
  height: 120px;
  justify-content: center;
}

.database-link:hover {
  background: #667eea;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
  text-decoration: none;
}

.database-logo {
  width: 50px;
  height: 50px;
  background: #667eea;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.database-link:hover .database-logo {
  background: white;
  color: #667eea;
}

.database-name {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

/* 分馆导航 */
.library-branches {
  background: white;
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.branch-item {
  background: #f8f9fa;
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.branch-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.branch-link {
  display: flex;
  align-items: center;
  padding: 20px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
}

.branch-link:hover {
  color: #667eea;
  text-decoration: none;
}

.branch-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea, #94070a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  margin-right: 15px;
  flex-shrink: 0;
}

.branch-info h5 {
  margin: 0 0 5px 0;
  font-size: 16px;
  font-weight: 600;
}

.branch-info p {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

/* 智能推荐 */
.library-recommendations {
  background: white;
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.recommendation-content {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-recommendations {
  text-align: center;
  color: #6c757d;
}

/* 党建引领 */
.library-party {
  background: white;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.library-party .section-title {
  color: #dc3545;
  border-bottom-color: #dc3545;
}

.title-cn {
  display: block;
  font-size: 20px;
  margin-bottom: 5px;
}

.title-en {
  font-size: 12px;
  color: #6c757d;
  font-weight: normal;
  text-transform: uppercase;
}

.party-functions {
  margin-top: 20px;
}

.party-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #dc3545;
  padding: 15px;
  border-radius: 10px;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.party-item:hover {
  background: #fff5f5;
  transform: translateY(-2px);
  text-decoration: none;
  color: #dc3545;
}

.party-icon {
  width: 40px;
  height: 40px;
  background: #dc3545;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.party-item:hover .party-icon {
  transform: scale(1.1);
}

.party-item span {
  font-size: 12px;
  text-align: center;
  font-weight: 500;
}

/* 快速链接 */
.library-links {
  background: white;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list li {
  margin-bottom: 10px;
}

.link-list a {
  display: flex;
  align-items: center;
  color: #333;
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.link-list a:hover {
  background: #f8f9fa;
  color: #667eea;
  text-decoration: none;
}

.link-list a i {
  margin-right: 10px;
  color: #667eea;
}

/* 联系方式 */
.library-contact {
  background: white;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.contact-item {
  margin-bottom: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item h5 {
  color: #667eea;
  font-weight: 600;
  margin-bottom: 15px;
}

.contact-item p {
  margin: 8px 0;
  color: #6c757d;
  font-size: 14px;
}

.contact-item i {
  margin-right: 8px;
  color: #667eea;
  width: 16px;
}

/* 二维码 */
.library-qrcodes {
  background: white;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.qrcode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.qrcode-item {
  text-align: center;
}

.qrcode {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.qrcode img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
}

.qrcode-placeholder {
  color: #6c757d;
}

.qrcode-item span {
  font-size: 12px;
  color: #6c757d;
}

/* 悬浮工具栏 */
.library-float-toolbar {
  position: fixed;
  right: 30px;
  bottom: 100px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toolbar-item {
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667eea;
  border: 2px solid #e9ecef;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.toolbar-item:hover {
  background: #667eea;
  color: white;
  transform: scale(1.1);
  text-decoration: none;
}

.back-to-top {
  display: none;
  cursor: pointer;
}

/* 扩展页脚 */
.library-footer-extended {
  background: linear-gradient(135deg, #94070a 0%, #667eea 100%);
  background-image: url('../img/bg.png');
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
  color: white;
  padding: 30px 0;
}

.footer-stats p {
  margin: 8px 0;
  font-size: 14px;
}

.footer-stats i {
  margin-right: 8px;
  color: #3498db;
}

.footer-copyright p {
  margin: 8px 0;
  font-size: 14px;
  color: #bdc3c7;
}

/* 响应式设计 */
@media (max-width: 991.98px) {
  .library-functions {
    padding: 30px 0;
  }

  .database-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
  }

  .branch-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
  }

  .qrcode-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .qrcode {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 767.98px) {
  .library-hero {
    padding: 15px 0 40px;
  }

  .library-title {
    font-size: 20px;
  }

  .search-title {
    font-size: 24px;
  }

  .library-functions {
    padding: 20px 0;
    margin-top: -20px;
  }

  .library-content {
    padding: 20px 0;
  }

  .content-date {
    width: 80px;
    font-size: 12px;
  }

  .section-title {
    font-size: 20px;
  }

  .library-float-toolbar {
    right: 15px;
    bottom: 80px;
  }

  .toolbar-item {
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 575.98px) {
  .database-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .branch-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .qrcode-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .qrcode {
    width: 50px;
    height: 50px;
  }

  .qrcode-item span {
    font-size: 10px;
  }

  .function-item span {
    font-size: 12px;
  }

  .function-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}